import request from '@/utils/request'

/**
 * 根据ID取得用户
 * @param {Object} id
 */
export function getUser(id){
  return request({
    url: `user/${id}`,
    method: 'get'
  })
}
export function getAllUser(params){
  return request({
    url: `user/`,
    method: 'get',
		params
  })
}
export function saveUser(params){
  return request({
    url: `user/`,
    method: 'post',
	data: params
  })
}
export function updateUser(params){
  return request({
    url: `user/`,
    method: 'put',
	data: params
  })
}
export function deleteUser(param){
  return request({
    url: `user/${param}`,
    method: 'delete',
  })
}